package com.hj.system.system.shiro;

import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.credential.SimpleCredentialsMatcher;

public class CustomerCredentialsMatcher extends SimpleCredentialsMatcher {
    @Override
    public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) {
        UserNameLoginToken userNameLoginToken = (UserNameLoginToken) token;
        if (!userNameLoginToken.isRequriedPassword()) {
            return true;
        }
        return super.doCredentialsMatch(token, info);
    }
}
